package com.ruoyi.biz.service.impl;

import java.util.List;

import com.ruoyi.biz.domain.MaintainWarnUser;
import com.ruoyi.biz.mapper.MaintainWarnUserMapper;
import com.ruoyi.biz.service.IMaintainWarnUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2021-01-05
 */
@Service
public class MaintainWarnUserServiceImpl implements IMaintainWarnUserService
{
    @Autowired
    private MaintainWarnUserMapper maintainWarnUserMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param userId 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public MaintainWarnUser selectMaintainWarnUserById(Integer userId)
    {
        return maintainWarnUserMapper.selectMaintainWarnUserById(userId);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param maintainWarnUser 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<MaintainWarnUser> selectMaintainWarnUserList(MaintainWarnUser maintainWarnUser)
    {
        return maintainWarnUserMapper.selectMaintainWarnUserList(maintainWarnUser);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param maintainWarnUser 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertMaintainWarnUser(MaintainWarnUser maintainWarnUser)
    {
        return maintainWarnUserMapper.insertMaintainWarnUser(maintainWarnUser);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param maintainWarnUser 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateMaintainWarnUser(MaintainWarnUser maintainWarnUser)
    {
        return maintainWarnUserMapper.updateMaintainWarnUser(maintainWarnUser);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param userIds 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteMaintainWarnUserByIds(Integer[] userIds)
    {
        return maintainWarnUserMapper.deleteMaintainWarnUserByIds(userIds);
    }



    @Override
    public int deleteMaintainWarnUserById(Integer userId, Integer maintainId) {
        MaintainWarnUser maintainWarnUser = new MaintainWarnUser();
        maintainWarnUser.setMaintainId(maintainId);
        maintainWarnUser.setUserId(userId);
        return maintainWarnUserMapper.deleteMaintainWarnUserById(maintainWarnUser);
    }
}
